package com.hq.vieorecyclerview.video.Adapter;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager2.adapter.FragmentStateAdapter;
import org.jetbrains.annotations.NotNull;

import java.util.List;

/**
 * 首页页面适配器
 */
public class HomeAdapter extends FragmentPagerAdapter {
    private List<Fragment> lf=null;

    public HomeAdapter(@NonNull @NotNull FragmentManager fm,List<Fragment> lfm) {
        super(fm);
        this.lf=lfm;
    }

    @NonNull
    @NotNull
    @Override
    public Fragment getItem(int position) {
        return  this.lf.get(position);
    }

    @Override
    public int getCount() {
        return  this.lf.size();
    }
}
